package com.ruoyi.exam.service;

import com.github.pagehelper.PageInfo;
import com.ruoyi.exam.domain.ExamPaperQuestionCustomerAnswer;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.exam.domain.other.ExamPaperAnswerUpdate;
import com.ruoyi.exam.viewmodel.student.exam.ExamPaperSubmitItemVM;
import com.ruoyi.exam.viewmodel.student.question.answer.QuestionPageStudentRequestVM;

import java.util.List;

/**
 * <p>
 * 试卷题目答案表 服务类
 * </p>
 *
 * @author JY
 * @since 2024-02-26
 */
public interface IExamPaperQuestionCustomerAnswerService extends IService<ExamPaperQuestionCustomerAnswer> {

    PageInfo<ExamPaperQuestionCustomerAnswer> studentPage(QuestionPageStudentRequestVM requestVM);

    List<ExamPaperQuestionCustomerAnswer> selectListByPaperAnswerId(Integer id);

    /**
     * 试卷提交答案入库
     */
    void insertList(List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers);

    /**
     * 试卷问题答题信息转成ViewModel 传给前台
     */
    ExamPaperSubmitItemVM examPaperQuestionCustomerAnswerToVM(ExamPaperQuestionCustomerAnswer qa);


    Integer selectAllCount();

    List<Integer> selectMothCount();

    int updateScore(List<ExamPaperAnswerUpdate> examPaperAnswerUpdates);
}
